#ifndef CHANLIST_H
#define CHANLIST_H

#include <QObject>
#include <vector>
#include "components/chan.h"
#include "misc.h"

namespace Wishmaster
{
	class WISHMASTER_EXPORT ChanList : public QObject
	{
		Q_OBJECT
	public:
		explicit ChanList(QObject *parent = 0);
		virtual ~ChanList();

		void addChan(Chan* chan);
		void removeChan(Chan* chan);
		Chan* getChan(const QString& host) const;
		Chan* getChan(int number) const;
		int chansCount() const;
		void saveAll();
		void clear();
		Board* getBoard(const QString& chanName, const QString& boardId) const;
		ThreadPtr getThread(const ThreadId& id) const;
		PostPtr getPost(const PostId& id) const;

	signals:

	public slots:

	private:
		std::vector<Chan*> m_chans;

	};
}

#endif // CHANLIST_H
